exit status 1 expected '}' at end of input Hatası veriyor
int LEDpos = 1 ;
int leds[] = {1,2,3,4,5,6,7,8,9};
int ledStateA = LOW;
int var=10;
int status=0;
int button=13;
int lives =3;
long previousMillis = 0;
long interval = 500;
void setup ()
{
for(int a=2;a<11;a++)
{
pinMode(a,OUTPUT);
}
pinMode(button ,INPUT);
Serial.begin(9600);
}
void loop()
{
if(lives==0)
{
interval=500;
}
if(digitalRead(button)== LOW)
{
Serial.println("basıldı");
if(LEDpos==6)
{
interval/=1.5;
digitalWrite(6,HIGH);
delay(200);
digitalWrite(6,LOW);
delay(200);
digitalWrite(6,HIGH);
delay(200);
digitalWrite(6,LOW);
Serial.println("SONRAKI ASAMA");
}
else
{
delay(200);
digitalWrite(leds[1],HIGH);
lives--;
}
if(lives==0)
{
interval= 500;
Serial.println("OYUN BITTI");
}
}
unsigned long currentMillis =millis();
if(currentMillis - previousMillis > interval)
{
if(status==0)
{
if (LEDpos> 9 )
status=1;
else
LEDpos++;
}
if(status==1)
{
if (LEDpos<3)
status=0;
else
{ LEDpos--;
if(LEDpos == 2)
status=0;
}
}
previousMillis = currentMillis;
for (int x = 2; x <= 10;x++)
{
digitalWrite(x, LOW);
digitalWrite(LEDpos , HIGH);
}
}